package com.kclm.service.impl;

import com.kclm.mapper.AccountMapper;
import com.kclm.pojo.Account;
import com.kclm.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author : lvhx
 * @Date: 2025/11/5 10:46
 * @Description:
 */
@Service("accountService")
public class AccountServiceImpl implements AccountService {
    @Autowired
    private AccountMapper accountMapper;
    @Override
    public Account findByActno(String actno) {
        return accountMapper.selectByActno(actno);
    }

    @Override
    public boolean save(Account account) {
        int result  = accountMapper.insert(account);
        return result>0;
    }

    @Override
    public boolean deleteByActno(String actno) {
        int result  = accountMapper.deleteByActno(actno);
        return result>0;
    }

    @Override
    public boolean updateByActno(Account account) {
        int result  = accountMapper.updateByActno(account);
        return result>0;
    }

    @Override
    public List<Account> selectAll() {
        return accountMapper.selectAll();
    }
}
